package com.runner.boost;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.runner.game.GameHandler;
import com.runner.observer.Event;
import com.runner.observer.Observer;
import com.runner.observer.Subject;

public class CoinMultiplierBoost implements Observer, Boost {

	private GameHandler game;

	public CoinMultiplierBoost(GameHandler game, Subject subject) {
		this.game = game;
		subject.notify(Event.EVENT_COIN_MULT);
		subject.addObserver(this);
	}

	@Override
	public void activate() {
		// TODO Auto-generated method stub

	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub

	}

	@Override
	public void update(float delta) {
		// TODO Auto-generated method stub

	}

	@Override
	public void render(SpriteBatch sb) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isExists() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void onNotify(Event event) {
		switch (event) {
		case EVENT_WIN:
		case EVENT_DEATH:
			//double coins
			game.addCoins(game.getCoins());

			break;
		default:
			break;
		}

	}

}
